<template>
<!-- //组件的结构 -->
    <div class="demo">
        <h2>学校名称:{{schoolName}}</h2>
        <h2>学校地址:{{address}}</h2>
        <button @click.stop="showName">点我提示名称</button>
    </div>
</template>
<script>
// 组件交互相关的代码
export default {
    name: 'School',
    data () {
        return {
            schoolName: '1111',
            address: '2222'
        }
    },
    methods: {
        showName () {
            alert(this.schoolName)
        }
    }
}
</script>
<style>
/* //组件的样式 */
    .demo {
        background-color: orange;
    }
</style>